<%@ page language="java" contentType="text/html; charset=UTF-8"
  pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%-- 
   Copyright (C) 2010 Google Inc.

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 --%>
<%@page import="com.google.appengine.api.users.UserService"%>
<%@page import="com.google.appengine.api.users.UserServiceFactory"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Mr. Release Control Panel</title>
</head>
<body>
<h1>Mr. Release Control Panel</h1>
<%
  UserService userService = UserServiceFactory.getUserService();
  String thisURL = request.getRequestURI();

  if (request.getUserPrincipal() == null) {
%>
<p>Please <a href="<%=userService.createLoginURL(thisURL)%>">Sign
In</a>.</p>
<%
  } else {
%>
<p>Welcome, <%=request.getUserPrincipal().getName()%>.</p>
<ul>
  <li><a href="/configAnnotator">Configure Annotator</a></li>
  <li><a href="/configItems">Set config item values</a></li>
  <li><a href="/keepAlive">Keep JVM warm for a while.</a></li>
  <li><a href="<%=userService.createLogoutURL(thisURL)%>">Sign
  out</a></li>
</ul>
<p>These links are for testing services:</p>
<ul>
  <li><a href="/buildAssociations">View the wave/build
  associations on record.</a></li>
  <li><a href="/newRoster">Make a new roster wave</a></li>
  <li><a href="/newRelease">Make a new release wave</a></li>
  <li><a href="/updateBuildStatus">Updates a build status</a></li>
</ul>
<%
  }
%>
</body>
</html>